package com.wyzz.hr.action;

import java.io.File;
import java.net.URLDecoder;
import java.text.DecimalFormat;
import java.util.*;
import javax.servlet.http.HttpServletRequest;
import org.apache.commons.lang.StringUtils;
import org.hibernate.FetchMode;
import org.hibernate.criterion.DetachedCriteria;
import org.hibernate.criterion.Restrictions;

import com.wyzz.hr.base.BaseDownloadAction;
import com.wyzz.hr.base.FileOperate;
import com.wyzz.hr.bo.IEmpContractBo;
import com.wyzz.hr.bo.IEmployeeBo;
import com.wyzz.hr.pojo.ContractType;
import com.wyzz.hr.pojo.Empcontract;
import com.wyzz.hr.pojo.Employee;
import com.wyzz.hr.util.BaseCrit;
import com.wyzz.hr.util.MyTools;
import com.wyzz.hr.util.Pager;

public class ContractManagement extends BaseDownloadAction {

	public ContractManagement() {
		page = new Pager();
		outputIoName = "OEmployeeContract";
	}

	public String execute() throws Exception {
		getDrillDownList();
		this.contractList = searchEmpContract();
		DecimalFormat df = new DecimalFormat("#.0");
		for (Employee employee : this.contractList) {
			employee.setJoinYear(MyTools.getWorkYearProfile(employee
					.getEmpJoinDate(), new Date()));
			if (employee.getEmpConfirmDate() != null) {
				employee.setPracticeMonth(Float
						.valueOf(df.format((float) (employee
								.getEmpConfirmDate().getTime() - employee
								.getEmpJoinDate().getTime())
								/ 30.0F / 24.0F / 3600.0F / 1000.0F)));
			}
		}
		if ("export".equals(this.searchOrExport)) {
			return downloadToExcel(this.contractList, this.outputIoName,
					this.outmatchModelId, "");
		}
		return "success";
	}

	private List searchEmpContract() {
		DetachedCriteria dcEmpCon = searchEmpWithCon_DC();
		addCriteria(dcEmpCon);
		IEmpContractBo empContractBo = (IEmpContractBo) getBean("empContractBo");
		return empContractBo.findContractByEmp(dcEmpCon, page, searchOrExport);
	}

	private DetachedCriteria searchEmpWithCon_DC() {
		DetachedCriteria dc = DetachedCriteria.forClass(Employee.class);
		dc.setFetchMode(Employee.PROP_EMP_DEPT_NO, FetchMode.JOIN);
		dc.createAlias(Employee.PROP_EMP_DEPT_NO, "empDeptNo", 1);
		dc.createAlias(Employee.PROP_EMP_CONTRACT, "con", 1);
		dc.createAlias((new StringBuilder()).append("con.").append(
				Empcontract.PROP_CONTRACT_TYPE).toString(), "conType", 1);
		if ("export".equals(searchOrExport)) {
			dc.setFetchMode(Employee.PROP_EMP_PB_NO, FetchMode.JOIN);
			dc.setFetchMode(Employee.PROP_EMP_LOCATION_NO, FetchMode.JOIN);
			dc.setFetchMode(Employee.PROP_EMP_TYPE, FetchMode.JOIN);
			dc.setFetchMode(Employee.PROP_EMP_BENEFIT_TYPE, FetchMode.JOIN);
		}
		return dc;
	}

	public void addCriteria(DetachedCriteria dc) {
		if ("SUB".equals(super.authorityCondition))
			addSubDC(dc, "", 1);
		addOrders(dc, page, new String[] {
				(new StringBuilder()).append("con.").append(
						Empcontract.PROP_ECT_LAST_CHANGE_TIME).append("-down")
						.toString(),
				(new StringBuilder()).append(Employee.PROP_EMP_DISTINCT_NO)
						.append("-up").toString() });
		if (employee != null) {
			BaseCrit.addEmpDC(dc, "", employee.getEmpName());
			BaseCrit.addDeptDC(dc, Employee.PROP_EMP_DEPT_NO,
					Employee.PROP_EMP_PB_NO, Integer.valueOf(1), employee
							.getEmpDeptNo());
		}
		BaseCrit.addDC(dc, Employee.PROP_EMP_STATUS, "eq",
				new Integer[] { Integer.valueOf(1) });
		if (searchContract == null)
			return;
		if ("4".equals(searchContract.getEctStatus())) {
			dc.add(Restrictions.isNull(Employee.PROP_EMP_CONTRACT));
			return;
		}
		if (toExpire != null && -1 == toExpire.intValue())
			BaseCrit.addDCDateExpire(dc, (new StringBuilder()).append("con.")
					.append(Empcontract.PROP_ECT_END_DATE).toString(), "le",
					toExpire, null);
		else if (toExpire != null)
			BaseCrit.addDCDateExpire(dc, (new StringBuilder()).append("con.")
					.append(Empcontract.PROP_ECT_END_DATE).toString(), null,
					toExpire, null);
		BaseCrit.addDC(dc, (new StringBuilder()).append("con.").append(
				Empcontract.PROP_ECT_NO).toString(), "like",
				new String[] { searchContract.getEctNo() });
		BaseCrit.addDC(dc, (new StringBuilder()).append("con.").append(
				Empcontract.PROP_ECT_COMMENTS).toString(), "like",
				new String[] { searchContract.getEctComments() });
		BaseCrit.addDC(dc, (new StringBuilder()).append("con.").append(
				Empcontract.PROP_ETC_EXPIRE).toString(), "eq",
				new Integer[] { searchContract.getEtcExpire() });
		BaseCrit.addDCDateRange(dc, (new StringBuilder()).append("con.")
				.append(Empcontract.PROP_ECT_START_DATE).toString(),
				searchContract.getEctStartDate(), ectStartDateTo);
		BaseCrit.addDCDateRange(dc, (new StringBuilder()).append("con.")
				.append(Empcontract.PROP_ECT_END_DATE).toString(),
				searchContract.getEctEndDate(), ectEndDateTo);
		BaseCrit.addDC(dc, (new StringBuilder()).append("con.").append(
				Empcontract.PROP_CONTRACT_TYPE).toString(), "id",
				new Object[] { searchContract.getContractType() });
		if ("5".equals(searchContract.getEctStatus())) {
			dc.add(Restrictions.eq((new StringBuilder()).append("con.").append(
					Empcontract.PROP_ECT_STATUS).toString(), "1"));
			dc.add(Restrictions.lt((new StringBuilder()).append("con.").append(
					Empcontract.PROP_ECT_END_DATE).toString(), new Date()));
			return;
		} else {
			BaseCrit.addDC(dc, (new StringBuilder()).append("con.").append(
					Empcontract.PROP_ECT_STATUS).toString(), "eq",
					new String[] { searchContract.getEctStatus() });
			return;
		}
	}

	private void getDrillDownList() {
		empTypeList = getDrillDown("ContractType", new String[0]);
		deptList = getDrillDown("Department", new String[0]);
	}

	public String batchCreate() {
		if (StringUtils.isEmpty(ids)) {
			addErrorInfo("\u9519\u8BEF\u7684\u8BF7\u6C42\u53C2\u6570\uFF0C\u8BF7\u5237\u65B0\u9875\u9762\u540E\u91CD\u8BD5\uFF01");
			return "success";
		}
		Empcontract contract = new Empcontract();
		contract.setEctStartDate(batchStartDate);
		contract.setEctEndDate(batchEndDate);
		contract.setContractType(new ContractType(batchempTypeId));
		contract.setEtcExpire(batchExpire);
		contract.setEctStatus(batchStatus);
		contract.setEctComments(batchComments);
		String idArr[] = ids.split(",");
		String errorStr = "";
		IEmployeeBo empBo = (IEmployeeBo) getBean("empBo");
		List empList = empBo.searchEmpContract(idArr);
		IEmpContractBo empContractBo = (IEmpContractBo) getBean("empContractBo");
		Date now = new Date();
		for (Iterator i$ = empList.iterator(); i$.hasNext();) {
			Employee emp = (Employee) i$.next();
			Empcontract c = emp.getContract();
			if (c != null && StringUtils.isNotEmpty(c.getEctId())) {
				errorStr = (new StringBuilder()).append(errorStr).append(
						emp.getEmpName()).append(",").toString();
			} else {
				contract.setEmployee(emp);
				contract.setEctCreateBy(getCurrentEmpNo());
				contract.setEctLastChangeBy(getCurrentEmpNo());
				contract.setEctCreateDate(now);
				contract.setEctLastChangeTime(now);
				empContractBo.insert(contract);
				empBo.updateEmp(emp.getId(), getCurrentEmpNo(), contract
						.getEctId());
			}
		}

		if (errorStr.length() > 0) {
			errorStr = (new StringBuilder())
					.append(errorStr.substring(0, errorStr.length() - 1))
					.append(
							"\u5DF2\u7ECF\u5B58\u5728\u5408\u540C\uFF0C\u521B\u5EFA\u5408\u540C\u4E0D\u6210\u529F\uFF01")
					.toString();
			addErrorInfo(errorStr);
		} else {
			addSuccessInfo("\u6279\u91CF\u521B\u5EFA\u5408\u540C\u6210\u529F\uFF01");
		}
		return "success";
	}

	public String batchContinuous() {
		if (StringUtils.isEmpty(ids) || StringUtils.isEmpty(ectIds))
			return "success";
		String errMsg = "";
		String error = "";
		String dateError = "";
		IEmployeeBo empBo = (IEmployeeBo) getBean("empBo");
		String idArr[] = ids.split(",");
		List empList = empBo.searchEmpContract(idArr);
		String ectIdArr[] = ectIds.split(",");
		IEmpContractBo empContractBo = (IEmpContractBo) getBean("empContractBo");
		Date now = new Date();
		Iterator i$ = empList.iterator();
		do {
			if (!i$.hasNext())
				break;
			Employee emp = (Employee) i$.next();
			Empcontract old = emp.getContract();
			int flag = 0;
			int i = 0;
			do {
				if (i >= ectIdArr.length)
					break;
				if (old.getEctId().trim().equals(ectIdArr[i].trim())) {
					flag = 1;
					break;
				}
				i++;
			} while (true);
			if (flag == 0)
				continue;
			if (old == null || StringUtils.isEmpty(old.getEctId())) {
				errMsg = (new StringBuilder()).append(errMsg).append(
						emp.getEmpName()).append("\uFF0C").toString();
				continue;
			}
			if (old.getEtcExpire().intValue() == 1) {
				error = (new StringBuilder()).append(error).append(
						emp.getEmpName()).append('\uFF0C').toString();
				continue;
			}
			Empcontract contract = new Empcontract();
			contract.setContractType(new ContractType(batchempTypeId));
			contract.setEtcExpire(batchExpire);
			contract.setEctStatus(batchStatus);
			contract.setEctComments(batchComments);
			if (batchExpire.intValue() == 1) {
				if (batchStartDate.after(old.getEctStartDate())) {
					contract.setEctStartDate(batchStartDate);
				} else {
					dateError = (new StringBuilder()).append(dateError).append(
							emp.getEmpName()).append('\uFF0C').toString();
					continue;
				}
				contract.setEctEndDate(null);
			} else if (batchExpire.intValue() == 0 && radioSub.intValue() == 0) {
				if (batchStartDate.after(old.getEctStartDate())) {
					contract.setEctStartDate(batchStartDate);
				} else {
					dateError = (new StringBuilder()).append(dateError).append(
							emp.getEmpName()).append('\uFF0C').toString();
					continue;
				}
				if (batchEndDate.after(old.getEctEndDate())) {
					contract.setEctEndDate(batchEndDate);
				} else {
					dateError = (new StringBuilder()).append(dateError).append(
							emp.getEmpName()).append('\uFF0C').toString();
					continue;
				}
			} else if (batchExpire.intValue() == 0 && radioSub.intValue() == 1) {
				Calendar c = Calendar.getInstance();
				c.setTime(old.getEctEndDate());
				c.add(5, 1);
				contract.setEctStartDate(c.getTime());
				c.setTime(old.getEctEndDate());
				c.add(1, continueYear.intValue());
				contract.setEctEndDate(c.getTime());
			}
			old.setEctStatus("2");
			old.setEctLastChangeTime(new Date());
			old.setEctLastChangeBy(getCurrentEmpNo());
			if (contract.getEctAttatchment() != null) {
				FileOperate.deleteFile("sys.profile.file.path", old
						.getEctAttatchment());
				old.setEctAttatchment(contract.getEctAttatchment());
			} else {
				contract.setEctAttatchment(old.getEctAttatchment());
			}
			empContractBo.updateObj(old);
			contract.setEmployee(emp);
			contract.setEctCreateBy(getCurrentEmpNo());
			contract.setEctLastChangeBy(getCurrentEmpNo());
			contract.setEctCreateDate(now);
			contract.setEctLastChangeTime(now);
			empContractBo.insert(contract);
			empBo
					.updateEmp(emp.getId(), getCurrentEmpNo(), contract
							.getEctId());
		} while (true);
		if (errMsg.length() > 0) {
			errMsg = errMsg.substring(0, errMsg.length() - 1);
			errMsg = (new StringBuilder()).append(errMsg).append(
					"\u4E0D\u5B58\u5728\u5408\u540C\uFF0C").toString();
		}
		if (error.length() > 0) {
			error = error.substring(0, error.length() - 1);
			error = (new StringBuilder()).append(error).append(
					"\u5B58\u5728\u65E0\u9650\u671F\u5408\u540C\uFF0C")
					.toString();
		}
		if (dateError.length() > 0) {
			dateError = dateError.substring(0, dateError.length() - 1);
			dateError = (new StringBuilder())
					.append(dateError)
					.append(
							"\u5B58\u5728\u65B0\u8001\u5408\u540C\u65F6\u95F4\u51B2\u7A81\uFF0C")
					.toString();
		}
		String rs = (new StringBuilder()).append(errMsg).append(error).append(
				dateError).toString();
		if (rs.trim().length() > 0) {
			rs = (new StringBuilder()).append(rs).append(
					"\u7EED\u7B7E\u5408\u540C\u4E0D\u6210\u529F\u3002")
					.toString();
			addErrorInfo(rs);
			return "success";
		}
		if (rs.trim().length() == 0) {
			addSuccessInfo("\u6279\u91CF\u7EED\u7B7E\u6210\u529F\u3002");
			return "success";
		} else {
			return "success";
		}
	}

	public String batchRepeal() {
		if (StringUtils.isEmpty(ids) || StringUtils.isEmpty(ectIds)) {
			addErrorInfo("\u9519\u8BEF\u7684\u8BF7\u6C42\u53C2\u6570\uFF0C\u8BF7\u5237\u65B0\u9875\u9762\u540E\u91CD\u8BD5\uFF01");
			return "success";
		}
		if (!StringUtils.isEmpty(comments))
			try {
				comments = URLDecoder.decode(getRequest().getParameter(
						"comments"), "UTF-8");
			} catch (Exception e) {
			}
		String error = "";
		IEmployeeBo empBo = (IEmployeeBo) getBean("empBo");
		String arr[] = ids.split(",");
		List empList = empBo.searchEmpContract(arr);
		String ectIdArr[] = ectIds.split(",");
		IEmpContractBo empContractBo = (IEmpContractBo) getBean("empContractBo");
		Iterator i$ = empList.iterator();
		do {
			if (!i$.hasNext())
				break;
			Employee emp = (Employee) i$.next();
			Empcontract old = emp.getContract();
			if (old != null && old.getEctId() != null) {
				int flag = 0;
				int i = 0;
				do {
					if (i >= ectIdArr.length)
						break;
					if (old.getEctId().trim().equals(ectIdArr[i].trim())) {
						flag = 1;
						break;
					}
					i++;
				} while (true);
				if (flag != 0) {
					old.setEctStatus("3");
					error = (new StringBuilder()).append(error)
							.append(
									empContractBo.update(old, old.getEctId(),
											comments)).toString();
				}
			}
		} while (true);
		if (error.length() > 0)
			addErrorInfo(error);
		else
			addSuccessInfo("\u6279\u91CF\u89E3\u9664\u5408\u540C\u6210\u529F\uFF01");
		return "success";
	}

	public String checkOldEmployee(String empId) {
		if (empId == null)
			return "success";
		IEmployeeBo empBo = (IEmployeeBo) getBean("empBo");
		Employee emp = empBo.loadEmp(empId, null);
		if (emp == null)
			return "success";
		IEmpContractBo empContractBo = (IEmpContractBo) getBean("empContractBo");
		List list = empContractBo.searchByEmpNo(empId);
		Empcontract empct = (Empcontract) list.get(0);
		if (empct.getEctStatus().equals("1")
				&& empct.getEtcExpire().intValue() == 1)
			return "fail";
		emp.setJoinYear(Float.valueOf((float) ((new Date()).getTime() - emp
				.getEmpJoinDate().getTime())
				/ 1000F / 3600F / 24F / 365F));
		if (emp.getJoinYear().floatValue() >= 10F)
			return "\u5458\u5DE5\u5165\u804C\u5E74\u9650\u5DF2\u8D85\u8FC7\u5341\u5E74\uFF0C\u5E94\u7B7E\u8BA2\u65E0\u9650\u671F\u5408\u540C\u3002";
		if (list != null && list.size() > 1)
			return "\u5458\u5DE5\u5DF2\u7B7E\u8BA2\u4E24\u4EFD\uFF08\u4EE5\u4E0A\uFF09\u5408\u540C\uFF0C\u5E94\u7B7E\u8BA2\u65E0\u9650\u671F\u5408\u540C\u3002";
		else
			return "success";
	}

	public String deleteContract() {
		if (StringUtils.isEmpty(ectId)) {
			addErrorInfo("\u975E\u6CD5\u7684\u8BF7\u6C42\u53C2\u6570\uFF0C\u8BF7\u9009\u62E9\u8981\u5220\u9664\u7684\u8BB0\u5F55\uFF01");
			return "success";
		}
		IEmpContractBo empContractBo = (IEmpContractBo) getBean("empContractBo");
		Empcontract ect = empContractBo.getById(ectId);
		if (ect == null) {
			addErrorInfo("\u60A8\u8981\u5220\u9664\u7684\u8BB0\u5F55\u5DF2\u7ECF\u88AB\u5220\u9664\uFF01");
			return "success";
		}
		String fileName = ect.getEctAttatchment();
		if (fileName != null && !"".equals(fileName))
			FileOperate.deleteFile("sys.profile.file.path", fileName);
		String info = empContractBo.delete(ect);
		addSuccessInfo(info);
		return "success";
	}

	public String updateContract() throws Exception {
		IEmpContractBo empContractBo;
		String currentEmpNo = getCurrentEmpNo();
		if (employeeId == null || "".equals(employeeId))
			employeeId = currentEmpNo;
		empContractBo = (IEmpContractBo) getBean("empContractBo");
		if (fileFileName != null && !"".equals(fileFileName)) {
			String UploadResult;
			String pathConfig = "sys.profile.file.path";
			String typeConfig = "sys.profile.file.type";
			String lengthConfig = "sys.profile.file.length";
			String postfix = fileFileName.substring(fileFileName
					.lastIndexOf("."));
			fileFileName = (new StringBuilder()).append(UUID.randomUUID())
					.append(postfix).toString();
			UploadResult = FileOperate.buildFile(file, pathConfig, typeConfig,
					lengthConfig, new String[] { fileFileName,
							searchContract.getEctAttatchment() });
			if ("property".equals(UploadResult)) {
				addActionError("\u6587\u4EF6\u7684\u4E0A\u4F20\u9519\u8BEF\uFF01");
				return "error";
			}
			if ("fileExtendNameError".equals(UploadResult)) {
				addActionError("\u6587\u4EF6\u7684\u540E\u7F00\u540D\u4E0D\u5408\u6CD5\uFF01");
				return "error";
			}
			try {
				searchContract.setEctAttatchment(fileFileName);
			} catch (Exception e) {
				e.printStackTrace();
			}
		}
		IEmployeeBo empBo = (IEmployeeBo) getBean("empBo");
		Employee emp = empBo.loadEmp(updateEctId, new String[] { "contract" });
		searchContract.setEmployee(emp);
		searchContract.setEctCreateBy(getCurrentEmpNo());
		searchContract.setEctLastChangeBy(getCurrentEmpNo());
		searchContract.setEctCreateDate(new Date());
		searchContract.setEctLastChangeTime(new Date());
		empContractBo
				.update(searchContract, emp.getContract().getEctId(), null);
		clear();
		addActionMessage("\u66F4\u65B0\u5458\u5DE5\u5408\u540C\u6210\u529F\u3002");
		return "success";
	}

	public String attachDelete() throws Exception {
		if (updateEctId == null || updateEctId.equals("")
				|| fileFileName == null || "".equals(fileFileName)) {
			addActionError("\u53C2\u6570\u4F20\u9012\u9519\u8BEF\uFF01");
			return "error";
		}
		IEmpContractBo empContractBo = (IEmpContractBo) getBean("empContractBo");
		if (!empContractBo.deleteAttach(updateEctId, fileFileName)) {
			addActionError("\u9644\u4EF6\u5220\u9664\u5931\u8D25\uFF01");
			return "error";
		} else {
			addActionMessage("\u9644\u4EF6\u5220\u9664\u6210\u529F\u3002");
			return "success";
		}
	}

	public String getYearOrMonth(Float joinYear) {
		int value = 0;
		String result = "";
		if (joinYear.floatValue() >= 1.0F) {
			value = Integer.parseInt((new StringBuilder()).append(
					joinYear.intValue()).append("").toString());
			result = (new StringBuilder()).append(result).append(value).append(
					"\u5E74").toString();
		} else {
			joinYear = Float.valueOf(joinYear.floatValue() * 100F);
			value = Integer.parseInt((new StringBuilder()).append(
					joinYear.intValue()).append("").toString());
			result = (new StringBuilder()).append(result).append(value).append(
					"\u4E2A\u6708").toString();
		}
		return result;
	}

	public String getEctNo() {
		return ectNo;
	}

	public void setEctNo(String ectNo) {
		this.ectNo = ectNo;
	}

	public String getEmployeeId() {
		return employeeId;
	}

	public void setEmployeeId(String employeeId) {
		this.employeeId = employeeId;
	}

	public String getFileFileName() {
		return fileFileName;
	}

	public void setFileFileName(String fileFileName) {
		this.fileFileName = fileFileName;
	}

	public File getFile() {
		return file;
	}

	public void setFile(File file) {
		this.file = file;
	}

	public String getUpdateEctId() {
		return updateEctId;
	}

	public void setUpdateEctId(String updateEctId) {
		this.updateEctId = updateEctId;
	}

	public List getContractList() {
		return contractList;
	}

	public void setContractList(List contractList) {
		this.contractList = contractList;
	}

	public List getEmpTypeList() {
		return empTypeList;
	}

	public void setEmpTypeList(List empTypeList) {
		this.empTypeList = empTypeList;
	}

	public Date getEctStartDateTo() {
		return ectStartDateTo;
	}

	public void setEctStartDateTo(Date ectStartDateTo) {
		this.ectStartDateTo = ectStartDateTo;
	}

	public Date getEctEndDateTo() {
		return ectEndDateTo;
	}

	public void setEctEndDateTo(Date ectEndDateTo) {
		this.ectEndDateTo = ectEndDateTo;
	}

	private void clear() {
		ectNo = null;
		batchStartDate = null;
		batchEndDate = null;
		ectStartDateTo = null;
		ectEndDateTo = null;
		batchExpire = null;
		fileFileName = null;
		file = null;
		batchComments = null;
		batchStatus = null;
		batchempTypeId = null;
		employeeId = null;
		searchContract = null;
	}

	public Employee getEmployee() {
		return employee;
	}

	public void setEmployee(Employee employee) {
		this.employee = employee;
	}

	public Pager getPage() {
		return page;
	}

	public void setPage(Pager page) {
		this.page = page;
	}

	public List getDeptList() {
		return deptList;
	}

	public void setDeptList(List deptList) {
		this.deptList = deptList;
	}

	public Integer getToExpire() {
		return toExpire;
	}

	public void setToExpire(Integer toExpire) {
		this.toExpire = toExpire;
	}

	public Empcontract getSearchContract() {
		return searchContract;
	}

	public void setSearchContract(Empcontract searchContract) {
		this.searchContract = searchContract;
	}

	public String getEctId() {
		return ectId;
	}

	public void setEctId(String ectId) {
		this.ectId = ectId;
	}

	public String getIds() {
		return ids;
	}

	public void setIds(String ids) {
		this.ids = ids;
	}

	public Date getBatchStartDate() {
		return batchStartDate;
	}

	public void setBatchStartDate(Date batchStartDate) {
		this.batchStartDate = batchStartDate;
	}

	public Date getBatchEndDate() {
		return batchEndDate;
	}

	public void setBatchEndDate(Date batchEndDate) {
		this.batchEndDate = batchEndDate;
	}

	public Integer getBatchExpire() {
		return batchExpire;
	}

	public void setBatchExpire(Integer batchExpire) {
		this.batchExpire = batchExpire;
	}

	public String getBatchComments() {
		return batchComments;
	}

	public void setBatchComments(String batchComments) {
		this.batchComments = batchComments;
	}

	public String getBatchStatus() {
		return batchStatus;
	}

	public void setBatchStatus(String batchStatus) {
		this.batchStatus = batchStatus;
	}

	public String getBatchempTypeId() {
		return batchempTypeId;
	}

	public void setBatchempTypeId(String batchempTypeId) {
		this.batchempTypeId = batchempTypeId;
	}

	public String getEctIds() {
		return ectIds;
	}

	public void setEctIds(String ectIds) {
		this.ectIds = ectIds;
	}

	public Integer getContinueYear() {
		return continueYear;
	}

	public void setContinueYear(Integer continueYear) {
		this.continueYear = continueYear;
	}

	public Integer getRadioSub() {
		return radioSub;
	}

	public void setRadioSub(Integer radioSub) {
		this.radioSub = radioSub;
	}

	public String getSearchOrExport() {
		return searchOrExport;
	}

	public void setSearchOrExport(String searchOrExport) {
		this.searchOrExport = searchOrExport;
	}

	public String getOutmatchModelId() {
		return outmatchModelId;
	}

	public void setOutmatchModelId(String outmatchModelId) {
		this.outmatchModelId = outmatchModelId;
	}

	public String getOutputIoName() {
		return outputIoName;
	}

	public void setOutputIoName(String outputIoName) {
		this.outputIoName = outputIoName;
	}

	public String getComments() {
		return comments;
	}

	public void setComments(String comments) {
		this.comments = comments;
	}

	private static final long serialVersionUID = 1L;
	private String ectNo;
	private Date batchStartDate;
	private Date batchEndDate;
	private Date ectStartDateTo;
	private Date ectEndDateTo;
	private Integer batchExpire;
	private String fileFileName;
	private File file;
	private String batchComments;
	private String batchStatus;
	private String batchempTypeId;
	private Integer toExpire;
	private String employeeId;
	private Employee employee;
	private String comments;
	private Empcontract searchContract;
	private String updateEctId;
	private List<Employee> contractList;
	private List empTypeList;
	private Integer continueYear;
	private Integer radioSub;
	private String ectId;
	private String searchOrExport;
	private String ids;
	private String ectIds;
	private Pager page;
	private List deptList;
	private String outmatchModelId;
	private String outputIoName;
}
